package com.ruoyi.binance.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.binance.mapper.BinanceTransactionConfMapper;
import com.ruoyi.binance.domain.BinanceTransactionConf;
import com.ruoyi.binance.service.IBinanceTransactionConfService;

/**
 * 交易配置Service业务层处理
 * 
 * @author zq
 * @date 2025-08-06
 */
@Service
public class BinanceTransactionConfServiceImpl implements IBinanceTransactionConfService 
{
    @Autowired
    private BinanceTransactionConfMapper binanceTransactionConfMapper;

    /**
     * 查询交易配置
     * 
     * @param id 交易配置主键
     * @return 交易配置
     */
    @Override
    public BinanceTransactionConf selectBinanceTransactionConfById(Long id)
    {
        return binanceTransactionConfMapper.selectBinanceTransactionConfById(id);
    }

    /**
     * 查询交易配置列表
     * 
     * @param binanceTransactionConf 交易配置
     * @return 交易配置
     */
    @Override
    public List<BinanceTransactionConf> selectBinanceTransactionConfList(BinanceTransactionConf binanceTransactionConf)
    {
        return binanceTransactionConfMapper.selectBinanceTransactionConfList(binanceTransactionConf);
    }

    /**
     * 新增交易配置
     * 
     * @param binanceTransactionConf 交易配置
     * @return 结果
     */
    @Override
    public int insertBinanceTransactionConf(BinanceTransactionConf binanceTransactionConf)
    {
        binanceTransactionConf.setCreateTime(DateUtils.getNowDate());
        return binanceTransactionConfMapper.insertBinanceTransactionConf(binanceTransactionConf);
    }

    /**
     * 修改交易配置
     * 
     * @param binanceTransactionConf 交易配置
     * @return 结果
     */
    @Override
    public int updateBinanceTransactionConf(BinanceTransactionConf binanceTransactionConf)
    {
        binanceTransactionConf.setUpdateTime(DateUtils.getNowDate());
        return binanceTransactionConfMapper.updateBinanceTransactionConf(binanceTransactionConf);
    }

    /**
     * 批量删除交易配置
     * 
     * @param ids 需要删除的交易配置主键
     * @return 结果
     */
    @Override
    public int deleteBinanceTransactionConfByIds(Long[] ids)
    {
        return binanceTransactionConfMapper.deleteBinanceTransactionConfByIds(ids);
    }

    /**
     * 删除交易配置信息
     * 
     * @param id 交易配置主键
     * @return 结果
     */
    @Override
    public int deleteBinanceTransactionConfById(Long id)
    {
        return binanceTransactionConfMapper.deleteBinanceTransactionConfById(id);
    }
}
